package com.yuhs.zixing.study.design.pattern.dp001.principle.p01.single.responsibility.sr001;

/**
 * @description 违反了单一职责原则
 * @author: yuhs
 * @date 2022/3/23 下午7:55
 */
public class SingleResponsibilityDemo_001 {

    public static void main(String[] args) {
        Vehicle vehicle = new Vehicle();
        vehicle.run("摩托车");
        vehicle.run("汽车");
        vehicle.run("飞机");
    }
}
class Vehicle {

    public void run(String vehicle) {
        System.out.println(vehicle + " 在公路上运行。。。");
    }
}


